Skip to main content

Chain Config

Queries chain config information for wallets like Keplr, Leap etc...

query Query($chainId: String!) {
chains {
chain_config(chainId: $chainId) {
chainID
chainName
rpc
rest
coinType
features
stakeCurrency {
coinDenom
coinMinimalDenom
coinDecimals
coinGeckoID
gasPriceStep {
low
average
high
}
}
gasPriceStep {
low
average
high
}
feeCurrencies {
coinDenom
coinMinimalDenom
coinDecimals
coinGeckoID
gasPriceStep {
low
average
high
}
}
currencies {
coinDenom
coinMinimalDenom
coinDecimals
coinGeckoID
}
bech32Config {
bech32PrefixAccAddr
bech32PrefixAccPub
bech32PrefixValAddr
bech32PrefixValPub
bech32PrefixConsAddr
bech32PrefixConsPub
}
bip44 {
coinType
}
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://api.euclidprotocol.com/graphql' \
--data '{"query":"query Query($chainId: String!) {\n chains {\n chain_config(chainId: $chainId) {\n chainID\n chainName\n rpc\n rest\n coinType\n features\n stakeCurrency {\n coinDenom\n coinMinimalDenom\n coinDecimals\n coinGeckoID\n gasPriceStep {\n low\n average\n high\n }\n }\n gasPriceStep {\n low\n average\n high\n }\n feeCurrencies {\n coinDenom\n coinMinimalDenom\n coinDecimals\n coinGeckoID\n gasPriceStep {\n low\n average\n high\n }\n }\n currencies {\n coinDenom\n coinMinimalDenom\n coinDecimals\n coinGeckoID\n }\n bech32Config {\n bech32PrefixAccAddr\n bech32PrefixAccPub\n bech32PrefixValAddr\n bech32PrefixValPub\n bech32PrefixConsAddr\n bech32PrefixConsPub\n }\n bip44 {\n coinType\n }\n }\n }\n}","variables":{"chainId":"localwasma-1"}}'

Open in Playground

Arguments

  • chainId (String!): The unique identifier of the chain.

Return Fields

FieldTypeDescription
chainIDStringThe identifier of the chain.
chainNameStringThe name of the chain.
rpcStringThe RPC URL for the chain.
restStringThe REST URL for the chain.
coinTypeStringBIP44 coin type for address derivation.
features[String]Indicate the features supported by this chain. Ex, cosmwasm, secretwasm ...
stakeCurrencyStakeCurrencyThe staking currency details.
gasPriceStepGasPriceStepThe gas price steps for the chain.
feeCurrencies[FeeCurrency]The fee currencies details.
currencies[Currencies]The currencies supported by the chain.
bech32ConfigBech32ConfigThe bech32 configuration for the chain.
bip44Bip44The bip44 configuration for the chain.

Nested Fields

StakeCurrency

FieldTypeDescription
coinDenomStringThe denomination of the coin.
coinMinimalDenomStringThe minimal denomination of the coin.
coinDecimalsIntThe number of decimal places of the coin.
coinGeckoIDStringThe CoinGecko ID for the coin.
gasPriceStepGasPriceStepThe gas price steps for the stake currency.

GasPriceStep

FieldTypeDescription
lowFloatThe low gas price step.
averageFloatThe average gas price step.
highFloatThe high gas price step.

FeeCurrency

FieldTypeDescription
coinDenomStringThe denomination of the fee currency.
coinMinimalDenomStringThe minimal denomination of the fee currency.
coinDecimalsIntThe number of decimal places of the fee currency.
coinGeckoIDStringThe CoinGecko ID for the fee currency.
gasPriceStepGasPriceStepThe gas price steps for the fee currency.

Currencies

FieldTypeDescription
coinDenomStringThe denomination of the currency.
coinMinimalDenomStringThe minimal denomination of the currency.
coinDecimalsIntThe number of decimal places of the currency.
coinGeckoIDStringThe CoinGecko ID for the currency.

Bech32Config

FieldTypeDescription
bech32PrefixAccAddrStringThe bech32 prefix for account addresses.
bech32PrefixAccPubStringThe bech32 prefix for account public keys.
bech32PrefixValAddrStringThe bech32 prefix for validator addresses.
bech32PrefixValPubStringThe bech32 prefix for validator public keys.
bech32PrefixConsAddrStringThe bech32 prefix for consensus node addresses.
bech32PrefixConsPubStringThe bech32 prefix for consensus node public keys.

Bip44

FieldTypeDescription
coinTypeIntBIP44 coin type for address derivation.

Chain Configs

Returns an array of Keplr Config. The return fields are the same as the ones described above.

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://api.euclidprotocol.com/graphql' \
--data '{"query":"query Chain_configs {\n chains {\n chain_configs {\n chainID\n chainName\n rpc\n rest\n coinType\n features\n stakeCurrency {\n coinDenom\n coinMinimalDenom\n coinDecimals\n coinGeckoID\n gasPriceStep {\n low\n average\n high\n }\n }\n gasPriceStep {\n low\n average\n high\n }\n feeCurrencies {\n coinDenom\n coinMinimalDenom\n coinDecimals\n coinGeckoID\n gasPriceStep {\n low\n average\n high\n }\n }\n currencies {\n coinDenom\n coinMinimalDenom\n coinDecimals\n coinGeckoID\n }\n bech32Config {\n bech32PrefixAccAddr\n bech32PrefixAccPub\n bech32PrefixValAddr\n bech32PrefixValPub\n bech32PrefixConsAddr\n bech32PrefixConsPub\n }\n bip44 {\n coinType\n }\n }\n }\n}"}'

Open in Playground